import config from './../../config.js';
import Base_layers_class from './../../core/base-layers.js';
import Selection_class from './../../tools/selection.js';
import { message } from 'antd'

class Edit_selection_class {

	constructor() {
		this.Base_layers = new Base_layers_class();
		this.Selection = new Selection_class(this.Base_layers.ctx, this.Base_layers.ctx_raster);
	}

	select_all() {
		if (config.layer.type != 'image') {
			message.open({
				key: this.name,
				type: 'black',
				content: `非图片类型暂不支持，请选择类型为图片的图层`,
				duration: 2
			})
			return;
		}
		this.Selection.select_all();
	}

	delete() {
		this.Selection.delete_selection();
	}
}

export default Edit_selection_class;
